import IconSearch from '@/assets/svg/icon_search'
import PropTypes from 'prop-types'
import React, { memo } from 'react'
import { InfoWrapper } from './style'

const SearchInfo = memo((props) => {
  const { info } = props

  return (
    <InfoWrapper>
      <div className="inner">
        {
          info.map((item, index) => {
            return (
              <div className="item" key={index}>
                {index !== 0 && <div className="slicer"></div>}
                <div className="content">
                  <div className="title">{ item.title }</div>
                  <div className="desc">{ item.desc }</div>
                </div>
              </div>
            )
          })
        }
        <div className="icon">
          <IconSearch />
        </div>
      </div>
    </InfoWrapper>
  )
})

SearchInfo.propTypes = {
  info: PropTypes.array
}

export default SearchInfo